Attachment to email in VBA (within Excel), please help
Posted by ~Mary Nimresazenoni on 16.Jul.03 at 03:52 PM using a Web browser Category : Applications Development Release: All Releases Platform: Windows 2000; Windows XP; Windows NT
Hi,
I am sending emails via notes within Excel - great. Got the mail going to the recipient and all folders I need.
Now I am trying to link an attachment to it - and not being a notes or vba chap I am struggling a bit. I keep getting:
Error 7223, "Invalid Embedding Type"
The code is:
Dim session
Dim db
Dim mailpath As String
Dim doc
Dim rtitem
Dim object
Set session = CreateObject("Notes.NotesSession")
mailpath = session.GETENVIRONMENTSTRING("MailFile", True)
Set db = session.getdatabase("", "")
Call db.openmail
Set doc = db.createdocument()
doc.Form = "Memo"
doc.Subject = busiwhoto & " Acknowledgement of Order " & custordno & "docrefack"
doc.body = stringer
doc.sendto = busiwhoto
doc.SaveMessageOnSend = True
Set rtitem = doc.CreateRichTextItem("Terms and Conditions")
Set object = rtitem.EmbedObject(EMBED_ATTACHMENT,"","g:\stdforms\stardetailsandconditionsofsale.rtf")
Call doc.Send(False, mailwhoto)
Call doc.PutInFolder("Sent Items\Acknowledgements", True)
It's happening on the embed_attachment line.
Where am I going wrong?
Mike
Attachment to email in VBA (within ... (~Mary Nimresaze... 16.Jul.03)
. . EMBED_ATTACHMENT = 1454. Try passin... (~Dan Elhipister... 16.Jul.03)
. . . . RE: EMBED_ATTACHMENT = 1454. Try pa... (~Mary Nimresaze... 21.Jul.03)